package com.jiuqi.common.authority.netrep;

import java.util.ArrayList;

import com.jiuqi.common.authority.netrep.origin.AuthorityException;
import com.jiuqi.common.authority.netrep.origin.AuthorizeException;
import com.jiuqi.common.authority.netrep.origin.ResInfo;

public interface AuthorizationAclMngI {
	  public String addResource(ResInfo ri) throws AuthorityException;
	  public boolean editResource(ResInfo ri) throws AuthorityException;
	  public boolean delResource(String guid) throws AuthorityException;
	  public boolean addChildResource(String parent, String child) throws AuthorityException;
	  public boolean delChildResource(String parent, String child) throws AuthorityException;
	  public boolean canAdmin(String user, String resource, int index);
	  public boolean canAccess(String user, String resource, int index);
	  public String judgeAclEx(String user, String resource, int aclUseSize);
	  public String getAcl(String user, String resource) throws AuthorityException;
	  public boolean delAcl(String operator, String user, String resource) throws AuthorizeException, AuthorityException;
	  public boolean setAcl(String operator, String user, String resource, String acl) throws AuthorizeException, AuthorityException;
	  public boolean setAcl(String operator, String user, String resource, int index, int flag) throws AuthorizeException, AuthorityException;
	  public boolean delAcl(String operator, String user, String resource, int index) throws AuthorizeException, AuthorityException;
	  public boolean setAcl(String operator, String user, String resource, int index, int admin, int permit, int forbid) throws AuthorizeException, AuthorityException;
	  public void delUserAcl(String operator, String user) throws AuthorizeException, AuthorityException;
	  public void delResAcl(String operator, String resource) throws AuthorizeException, AuthorityException;
	  public boolean sysSetAcl(String user, String resource, String acl) throws AuthorityException;
	  public void setMaxFailCount(int value) throws AuthorityException;
	  public void setLockDurationTime(long value) throws AuthorityException;
	  public void setAclMaxUseSize(int value) throws AuthorityException;
	  public ArrayList getConditionalAcls(String user, String resource) throws AuthorityException;
	  public ArrayList getRelatedConditionalAcls(String user, String resource) throws AuthorityException;
	  public boolean setConditionalAcls(String oprtator, String user, String resource, ArrayList conditionalAcls) throws AuthorizeException, AuthorityException;
	  public boolean changeAclCondition(String user, String resource, String oldCondition, String newCondition) throws AuthorityException;
	  public boolean deleteAclByCondition(String user, String resource, String condition) throws AuthorityException;
	  public String judgeAclEx(String user, String resource, int aclUseSize, String judger);
	  public String judgeInheritedAcl(String user, String resource, int aclUseSize, String judger);
	  public boolean addUserChild(String user, String child, String password) throws AuthorityException;
	  public boolean delUserChild(String user, String child) throws AuthorityException;
	  public ArrayList getUserChildList(String user) throws AuthorityException;
	  public String getUserChildPassword(String user, String child) throws AuthorityException;
	  public boolean existUserChild(String user, String child) throws AuthorityException;
	  public boolean exchangeUserChildOrder(String user, String child1, String child2) throws AuthorityException;
	  public void clearUserRelates(String operator, String usr_guid) throws AuthorizeException, AuthorityException;
	  public void resetAuthorityCacbe();

}
